package com.lyl.momanapp.activity;

import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.lyl.momanapp.R;
import com.lyl.momanapp.util.view.MyBaseActivity;

/**
 * 名字 梁亚龙
 * 时间 2017/10/15.
 * QQ邮箱 503934353@qq.com
 */

public class WebActivity extends MyBaseActivity {


    private WebView mWebView;

    @Override
    public void initUI() {
        setContentView(R.layout.activity_web);
        mWebView = ((WebView) findViewById(R.id.webView));
    }

    @Override
    public void initData() {
        mWebView.loadUrl("http://118.31.21.194/mijiu/page/");
        mWebView.setWebViewClient(new WebViewClientDemo());

    }

    @Override
    public void addListeners() {

    }
    @Override
    public void onClick(View v) {

    }
    private class WebViewClientDemo extends WebViewClient {
        @Override
        // 在WebView中不在默认浏览器下显示页面
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true;
        }
    }
}
